// src/api/api.ts
import request from "@/utils/request";

/**
 * 获取验证码
 * @returns
 */
export const getCodeApi = async () => {
  return request({
    url: "/api/code",
    method: "GET",
  });
};

/**
 * 登录
 * @param data
 * @returns
 */
export const loginApi = async (data: any) => {
  return request({
    url: "/api/login",
    method: "POST",
    data: data
  });
};

/**
 * 登出
 * @returns
 */
export const logout = () => {
  return request({
    url: "/api/logout",
    method: "GET",
  });
};
